package com.zephyr.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

@RestController
public class DemoController {
    private final Random random = new Random();

    @GetMapping("/work")
    public String doWork() throws InterruptedException {
        int sleep = random.nextInt(500);
        Thread.sleep(sleep);
        return "work for " + sleep + "ms";
    }
}
